Recent improvements in MOS semiconductor technology have resulted in advancement in large scale integrated circuit microprocessors. The latest generation of LSI microprocessors is an order of magnitude more powerful than the previous generation of microprocessors introduced 3 or 4 years ago. The latest generation of microprocessors, has 16-bit data paths and 16-bit arithmetic capability, and they directly address mulitple-megabyte memories. In terms of functional capability and speed, such microprocessors will outperform all but the high end models of current 16-bit mini computers.
LSI microprocessor design is now at the stage where better implementation techniques are required in order to control complexity and meet tight design schedules. One technique for achieving these goals is to use microprogramming for controlling the processor. Most of the traditionally claimed benefits of microprogramming, for example, regularity (to decrease complexity), flexibility (to ease design changes), and reduced design costs, apply to the implementation problems for current LSI microprocessor design.
Generally, a data processor performs a series of operations upon digital information in an execution unit according to a stored program of instructions. These instructions are often termed "macroinstructions" in order to avoid confusion with the microinstructions contained in the control store of the data processor. Each of the macroinstructions indicates to the data processor a particular operation to be performed. In addition, most macroinstructions specify the address of one or more operands upon which the operation will be performed. There are several ways in which these operands may be specified. In some cases, the operand is already contained by a register within the data processor execution unit. In other cases, however, the operand is stored in memory external to the data processor. Occasionally, the operand is located in a memory location immediately following the memory location from which the current macroinstruction was obtained (so called immediate addressing). In other cases, the operand is stored at a location in memory which is referenced by one of the data processor registers (so called effective addressing).
Thus, in order to execute a macroinstruction, the data processor must typically perform a series of microinstructions for computing the address and acquiring each of the operands and perform another series of microinstructions for performing the operation specified by the macroinstruction upon the acquired operands.
Data processors are usually adapted to perform many different types of operations. However, the various macroinstructions often use common addressing modes for specifying the operands associated with the particular instruction. Where a group of different macroinstructions use the same addressing mode, the size of the micro control store can be reduced by allowing this group of macroinstructions to share a single series of microinstructions for obtaining the operand rather than repeating this series of microinstructions for each of the several macroinstructions. Known data processors which provide such a microinstruction routine sharing capability generally include an instruction decoder which provides a starting address or pointer into a particular microinstruction routine corresponding to the particular macroinstruction. The particular microinstruction routine then branches to the shared microinstruction routine for computing the address of the operand and acquiring the operand. After the operand is acquired, control is returned to the particular microinstruction routine for performing the desired operation. The particular microinstruction routine may be considered analogous to a main program, while the shared microinstruction routine is analogous to a subroutine which is called by the main program.
The major disadvantage of this approach is the extra time which is required to effect the calls to and returns from the microinstruction addressing mode subroutines. Each time a subroutine is called, a return address must be saved so that control can be returned to the main program at the completion of the subroutine. Saving the return address requires extra time. It should be appreciated by those skilled in the art that a data processor which allows a series of microinstructions to be shared among many data processor operations while eliminating time delays typically associated with subroutine calls and returns is a significant improvement over the prior art.
A data processor must also respond to special circumstances which may arise during program execution. The special circumstances may be apparent from the macroinstruction itself, e.g. an illegal macroinstruction. Alternatively, a special circumstance may arise independently from the macroinstruction program, e.g., an interrupt from a peripheral device. In either case, the data processor must alter the normal flow of microinstructions in order to deal with the special circumstance.